<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <link rel="stylesheet" href="../../build/aui-css/css/bootstrap.css">
    <script src="../../build/aui/aui.js"></script>
</head>
<body>
    <h1>AlloyUI - Messaging</h1>
    <iframe src="http://127.0.0.1/github/alloy/demos/messaging/foreign.html" id="iframe" style="height:200px"></iframe><br>
    <button id="send">Send message</button>
    <script>
    YUI({filter:'raw'}).use('aui-messaging', 'aui-node', function(Y) {

        Y.one('#send').on('click', function(event) {
            Y.postMessage('message send from another domain.', 'http://127.0.0.1', Y.one('iframe'));
        });

    });
    </script>
</body>
</html>